import yaml from 'js-yaml';
import { resumeList } from '../data/resumeList';

export const loadYamlFile = async (filePath) => {
    try {
        const response = await fetch(filePath);
        const text = await response.text();
        return yaml.load(text);
    } catch (error) {
        console.error('Error loading YAML file:', error);
        return null;
    }
};

export const getAllYamlFiles = () => {
    return resumeList;
}; 